﻿@{
    ViewBag.Title = "DimensionEdit";
}
@section style
{
    <link href="/Content/bootstrap/css/bootstrap.css" rel="stylesheet">
}

@section scripts{
    <script src="/Content/bootstrap/js/bootstrap.js"></script>
}

<ol class="breadcrumb">
    <li><a href="/home">Home</a></li>
    <li><a href="/settings/dimension">Setting</a></li>
    @if (!string.IsNullOrEmpty(ViewBag.Model.Id) && ViewBag.Model.Id != "0")
    {
        <li class="active">Edit:@ViewBag.Model.Id</li>
    }
    else
    {
        <li class="active">New</li>
    }
</ol>
<div class="content">
    <form class="form-horizontal" role="form" action="/Settings/Level1Save" method="post">
        <div class="bs-example">
            <input type="hidden" name="Id" value="@ViewBag.Model.Id" />
            <div class="form-group">
                <label class="col-xs-1 control-label">Dim: </label>
                <div class="col-xs-4">
                    <input type="text" class="form-control" placeholder="Dim" name="Dim1" value="@ViewBag.Model.Dim1">
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-1 control-label">Dim Text: </label>
                <div class="col-xs-4">
                    <input type="text" class="form-control" placeholder="Dim Text" name="Dim1_Text" value="@ViewBag.Model.Dim1_Text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-1 control-label">FRQCY: </label>
                <div class="col-md-3">
                    <select class="form-control" name="FRQCY">
                        @{foreach (var FRQCY in ViewBag.FRQCY)
                          {
                              if (FRQCY.ToString() == ViewBag.Model.FRQCY)
                              {
                            <option selected>@FRQCY</option>
                              }
                              else
                              {
                            <option>@FRQCY</option>
                              }
                          }}
                    </select>
                </div>
            </div>
        </div>
        <div class="highlight text-right">
            <button type="submit" class="btn btn-success">Save</button>
            <a href="\Settings\Dimension" class="btn btn-danger">Cancel</a>
        </div>
    </form>
</div>

